package com.itxckf.service.impl;

import com.itxckf.mapper.LoginMapper;
import com.itxckf.pojo.User;
import com.itxckf.service.LoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class LoginServiceImpl implements LoginService {
    @Autowired
    private LoginMapper loginMapper;
    @Override
    public User login(User user) {
        return loginMapper.userLogin(user);
    }

    @Override
    public List<User> getUser(Integer id) {
        return loginMapper.getUser(id);
    }

    @Override
    public void register(User user) {
        loginMapper.register(user);
    }

    @Override
    public User isUser(String username) {
        return loginMapper.isUser(username);
    }
}
